<?php
namespace app\zyhsapi\validate;

use think\Validate;

class DivinationIndex extends Validate
{
    protected $rule = [
        'question'   => 'require|max:30',
        'uid'  => 'require|number',
        'timezone'=>'require',
        'longitude'  => 'require|float|between:-180,180',
        'latitude'  => 'require|float|between:-90,90',
    ];

    protected $message = [
        'question.require'   => '请输入想问的问题！',
        'question.max' => '字数超出限制！',
        'uid.require'   => '用户不存在！',
        'uid.number'   => '用户不存在',
        'tag_id.number'   => '类型异常',
        'timezone.require'=>'缺少时区',
        'longitude.require'=>'缺少经度',
        'longitude.float'=>'经度错误',
        'longitude.between'=>'经度错误',
        'latitude.require'=>'缺少纬度',
        'latitude.float'=>'纬度错误',
        'latitude.between'=>'纬度错误',
    ];

}
